{extend name="public/base" /}

{block name="title"}<title>{if condition="$data"}{$Think.lang.edit}{else /}{$Think.lang.create}{/if}</title>{/block}

{block name="pjax_container"}
<section class="content-header">
    <h1>课程及器械管理</h1>
    <ol class="breadcrumb">
        <li class="active"><i class="fa fa-dashboard"></i> 课程及器械管理</li>
    </ol>
</section>
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <form class="form-horizontal" method="POST" id="myform" action="{:url('Qx/add')}" enctype="multipart/form-data">
                <div class="nav-tabs-custom">
                    <ul class="nav nav-tabs">
                        <li class="active"><a href="#tab1" data-toggle="tab">{$Think.lang.base_param}</a></li>
                        <li class="pull-right"><a href="javascript:history.back(-1)" class="btn btn-sm"
                                                  style="padding:10px 2px;"><i class="fa fa-list"></i>
                            {$Think.lang.back}</a></li>
                    </ul>
                    <div class="tab-content">
                        <div class="tab-pane active" id="tab1">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">课程名称</label>
                                <div class="col-sm-7"><input class="form-control" name="designation" value=""
                                                             placeholder="课程名称">

                                                             </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">器械名称</label>
                                <div class="col-sm-7"><input class="form-control" name="designation" value=""
                                                             placeholder="器械名称">

                                                             </div>
                            </div>
                        </div>
                        <!--   <div class="form-group">
                              <label class="col-sm-2 control-label">{$Think.lang.status}</label>
                              <div class="col-sm-7">
                                  <select class="form-control select2" name="status" style="width:100%;">
                                      <option value="1">{$Think.lang.status1}</option>
                                      <option value="0">{$Think.lang.status0}</option>
                                  </select>
                              </div>
                          </div> -->
                    </div>
                </div>
                <div class="box-footer">
                    <div class="col-sm-2"></div>
                    <div class="col-sm-7">
                        <div class="btn-group pull-right">
                            <button type="submit" id='submit' class="btn btn-info pull-right"
                                    data-loading-text="&lt;i class='fa fa-spinner fa-spin '&gt;&lt;/i&gt; 提交">
                                提交
                            </button>
                        </div>
                        <div class="btn-group pull-left">
                            <button type="reset" class="btn btn-warning">撤销</button>
                        </div>
                    </div>
                </div>
        </div>
        </form>
    </div>
    </div>
</section>

<script type="text/javascript" charset="utf-8" async defer>
    // $(function(){
    //     $('#submit').click(function(){
    //         var formData = $("#myform").serialize();
    //         $.ajax({
    //             type:'POST',
    //             url:"{:url('Place/add')}",
    //             data:formData,
    //             success:function(data){
    //                 console.log(data)
    //             }

    //         })
    //     })
    // })
</script>
<script type="text/javascript">

    $(function () {
        /*ajax页面加载icheck，有该控件的页面才需要*/
        $('input[type="checkbox"].minimal, input[type="radio"].minimal').iCheck({
            checkboxClass: 'icheckbox_minimal-blue',
            radioClass: 'iradio_minimal-blue'
        });

        /*ajax页面加载icheck，有该控件的页面才需要*/
        $(".select2").select2({language: "zh-CN"});

        $('.timepicker').datetimepicker({
            format: 'YYYY-MM-DD',   //YYYY-MM-DD HH:mm:ss
            locale: moment.locale('zh-cn')
        });


        {if condition = " $rest_login == 1 "}

        restlogin('{$rest_login_info}');   //登录超时
        {/if}


    })
</script>
{/block}